--- id: TASK-010 title: 'Status bar: directory, theme, line:col, word count, help, selection counts' status: "\U0001F3C1 Done" assignee: [] created_date: '2026-06-29 16:26' updated_date: '2026-06-30 00:23' labels: - feature - release-1 dependencies: [] priority: medium ordinal: 10000 --- ## Description Release 1. Rework the status bar to always show: the current directory (the open file's folder, or the working/vault dir), the current theme name, the cursor position as Ln:Col (1-based), the document word count, and a '?' indicator for help (opens the in-app help overlay, TASK-011). When text is selected, additionally show the selection's character count and word count (e.g. '12 chars · 3 words selected'). Lay it out across the bar (left: dir / file + dirty dot; right: Ln:Col · words · theme · ?) without overflowing at narrow widths; keep theme colors (StatusFg/StatusBg). Counts update live. ## Acceptance Criteria - [x] #1 Status bar shows Ln:Col (1-based) updating live - [x] #2 Status bar shows a word count - [x] #3 Layout coexists with filename/dirty and respects theme colors - [x] #4 Always shows the current directory and the theme name - [x] #5 Shows a '?' help indicator (tied to the help overlay) - [x] #6 When text is selected, shows the selection's character count and word count - [x] #7 Bar degrades gracefully at narrow widths (no overflow) ## Implementation Notes Reworked statusBar (internal/app/app.go): left = dir/filename + dirty dot (transient a.status takes over when set); right = [N chars · M words selected ·] Ln r:c · N words · theme · ?. layoutStatus() right-justifies and drops trailing ' · ' segments then truncates to fit — no overflow at narrow widths. Editor stats helpers WordCount()/SelectionStats() in internal/editor/stats.go. Theme StatusFg/StatusBg preserved. '?' indicator shown; opening the overlay is wired in TASK-011. TDD: 3 editor + 6 app tests; full suite green. Left segment now shows the git repo root name (folder with .git) or the immediate parent folder when not in a repo, plus filename. repoOrParent() in app.go; 2 tests. (commit unrvrwqk)